package com.iterator.mapper.wechat.tcy;

import com.iterator.bean.wechat.tcy.pojo.MyCart;
import com.iterator.bean.wechat.tcy.pojo.MyCartExample;

import java.util.List;

import org.apache.ibatis.annotations.Param;

/**
 * @author tean_cy
 * @date 2021/1/12 17:35
 */
public interface MyCartMapper {
    long countByExample(MyCartExample example);

    int deleteByExample(MyCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MyCart record);

    int insertSelective(MyCart record);

    List<MyCart> selectByExample(MyCartExample example);

    MyCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MyCart record, @Param("example") MyCartExample example);

    int updateByExample(@Param("record") MyCart record, @Param("example") MyCartExample example);

    int updateByPrimaryKeySelective(MyCart record);

    int updateByPrimaryKey(MyCart record);

    Boolean selectChecked(@Param("productId") Integer productId, @Param("userId") Integer userId);

    int selectCountByUserId(@Param("userId") Integer userId, @Param("deleted") boolean deleted);


    List<MyCart> selectByUseIdAndCheckId(@Param("userId") Integer userId,
                                         @Param("checkId") Boolean checkId,
                                         @Param("deleteId") Boolean deleteId);
}